﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Windows.Forms;
using System.Linq;
using System.Text;

namespace RunUOGenerator
{
    class WeaponGeneralTab : TabPage
    {
        private WeaponItem weaponItem = new WeaponItem();

        private System.Windows.Forms.TextBox txtName;
        private System.Windows.Forms.Label lblName;

        public WeaponGeneralTab(WeaponItem weaponitem)
        {
            weaponItem = weaponitem;

            this.Name = "pageGeneralTest";
            this.Text = "General Test";
            this.Location = new System.Drawing.Point(4, 22);
            this.Padding = new System.Windows.Forms.Padding(3);
            this.Size = new System.Drawing.Size(470, 306);
            this.TabIndex = 0;
            this.UseVisualStyleBackColor = true;

            // Initializes the components 
            this.lblName = new System.Windows.Forms.Label();
            this.txtName = new System.Windows.Forms.TextBox();

            // 
            // lblName
            // 
            this.lblName.AutoSize = true;
            this.lblName.Location = new System.Drawing.Point(36, 31);
            this.lblName.Name = "lblName";
            this.lblName.Size = new System.Drawing.Size(38, 13);
            this.lblName.TabIndex = 0;
            this.lblName.Text = "Name:";
            // 
            // txtName
            // 
            this.txtName.Location = new System.Drawing.Point(39, 48);
            this.txtName.Name = "txtName";
            this.txtName.Size = new System.Drawing.Size(100, 20);
            this.txtName.TabIndex = 1;
            this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);

            // Add the controls
            this.Controls.Add(lblName);
            this.Controls.Add(txtName);

            // Do some layout stuff
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        private void txtName_TextChanged(object sender, EventArgs e)
        {
            weaponItem.Name = txtName.Text;
        }
    }
}
